home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / 2D_3D / 2DLab / 2DLab.app / 2DLab.nib (.txt) < prev    next >
Encoding:
NeXT TypedStream Data  |  1995-06-12  |  13.7 KB  |  339 lines

  1. typedstream
  2. StreamTable
  3.     HashTable
  4. Object
  5. [20c]
  6. typedstream
  7. [954c]
  8. typedstream
  9.     HashTable
  10. Object
  11. FirstResponder
  12. HeaderClass
  13. %%%%i@@
  14. firstnib
  15. checkSpelling:
  16. alignSelCenter:
  17.     unscript:
  18. pasteFont:
  19. runPageLayout:
  20. superscript:
  21. copyRuler:
  22.     copyFont:
  23. selectAll:
  24. pasteRuler:
  25. toggleRuler:
  26. showGuessPanel:
  27. alignSelLeft:
  28. paste:
  29. performClose:
  30. arrangeInFront:
  31. subscript:
  32. copy:
  33. alignSelRight:
  34. delete:
  35. orderFrontColorPanel:
  36. underline:
  37. performMiniaturize:
  38. TwoDView
  39. /usr/include/netinet/in.h
  40. viewnib
  41. fgColorWell
  42. highColorWell
  43. lineWidthSlider
  44. lineWidthText
  45. statusText
  46. bgColorWell
  47. numPointsForm
  48. setHighColorWell:
  49. saveEPS:
  50. lineWidthChanged:
  51. animThenDisp:
  52. setFgColorWell:
  53. disp:
  54. setOperation:
  55.     openData:
  56.     saveData:
  57. close:
  58. setBgColorWell:
  59.     saveTIFF:
  60. setAutoUpdate:
  61. random:
  62. [12982c]
  63. typedstream
  64.     HashTable
  65. Object
  66. NibData
  67. @@@@s
  68. Storage
  69. {*@@}
  70.     [67{*@@}]
  71. File's Owner
  72. CustomObject
  73. Application
  74.     InfoPanel
  75. WindowTemplate
  76. iiii***@s@
  77. Panel
  78.     Responder
  79.     TextField
  80. Control
  81. TextFieldCell
  82. ActionCell
  83. mVersion 2.0 of 9/29/91. Share with your colleagues.  Use the source.
  84. Don't pretend that you wrote it, though.
  85.     Helvetica
  86. 2DLab
  87. by Patrick J. Flynn
  88. #Computational Geometry in the Plane
  89. (flynn@eecs.wsu.edu)
  90. VersionNumber
  91. Field1
  92. Field2
  93. Field3
  94. Field4
  95. MainMenu
  96. MenuTemplate
  97. *@*@ccc
  98. Matrix
  99. @:@iiii
  100. MenuCell
  101. ButtonCell
  102. Info Panel...
  103. Help...
  104. ff@@#::s
  105. submenuAction:
  106. Bitmap
  107.     menuArrow
  108. Document
  109. Open Data...
  110. Save Data...
  111. Save TIFF...
  112. Save EPS...
  113. Close
  114. Paste
  115. Select All
  116. Windows
  117. Arrange in Front
  118.     Colors...
  119. Miniaturize Window
  120. Close Window
  121. Print...
  122. MenuItem
  123. Geometry Window
  124. Window
  125. CustomView
  126. TwoDView
  127.     HelpPanel
  128. ScrollView
  129. ClipView
  130. ciifffcfffs
  131. [5975c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
  132. \margl40
  133. \margr40
  134. {\colortbl\red0\green0\blue0;}
  135. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b\i0\ul0\fs24\fc0 2DLab
  136. \b0  animates a few algorithms from computational geometry.  It\
  137. was originally released in early 1990, back when I was a graduate\
  138. student at Michigan State University.  In the process of updating\
  139. the program for 2.0, things changed substantially, and many features\
  140. were added.  I hope you like the program.\
  141. \b Running the program
  142. \b0 \
  143. Two windows will appear when 
  144. \b 2DLab
  145. \b0  is fired up.  The Geometry Window\
  146. contains the data and the results of any algorithms run on the\
  147. data.  The 
  148. \b 2DLab Control
  149. \b0  window allows you to configure the data\
  150. set, the algorithm, and the drawing that takes place.\
  151. When the program is invoked, the 
  152. \b Geometry Window
  153. \b0  will contain ten\
  154. points, and the selected algorithm (Prim's MST algorithm by default)\
  155. will be applied to these points.  New points can be created by\
  156. clicking in the window.  There is a `margin' around the border of\
  157. the window  within which points will not be displayed, so If you\
  158. click the mouse button and no point appears, you're probably too\
  159. close to the edge (this margin was put in to make the Voronoi\
  160. tesselation have a nice border.\
  161. A new set of random points (uniformly distributed within the window's\
  162. usable region) can be generated by entering the desired number of\
  163. points in the editable text field and pressing the 
  164. \b Generate
  165. \b0  button.\
  166. The highlighted button in the RadioButton array in the 
  167. \b Control\
  168. Window
  169. \b0  identifies the particular algorithm to be `animated.'\
  170. \b Anim/Disp
  171. \b0  button will run the appropriate animation when pressed.\
  172. \b Disp
  173. \b0  button will simply display the resulting data structure without\
  174. animating.  It only works when the data structure has already been previously\
  175. computed (i.e. ya gotta 
  176. \b Anim
  177. \b0  before you can 
  178. \b Disp
  179. \b0 ).\
  180. \b Auto-Go
  181. \b0  checkbox specifies the program's behavior when new\
  182. points are created with the mouse.  If the box is checked, the\
  183. selected algorithm is run immediately when a new point is added.\
  184. The three 
  185. \b color wells
  186. \b0  allow you to pick background, foreground,\
  187. and highlighting colors.  When the display is drawn, points and\
  188. line segments appear in the foreground color.  During animation,\
  189. transient drawing is done using the highlight color.  By default,\
  190. these colors are white, black, and  67% gray, respectively.  You\
  191. can set them to anything you want using the standard color well\
  192. tricks.\
  193. \b  line width slider
  194. \b0  controls how thickly everything is drawn (both\
  195. points and lines).\
  196. The `
  197. \b Status
  198. \b0 ' item displays informative (?) messages about the\
  199. progress of the algorithm currently being animated, the drawing\
  200. taking place, etc.\
  201. \b Document menu
  202. \b0  allows you to save the current data set in a\
  203. `generic' form, load a similarly-formatted file in for animation,\
  204. and save the generated imagery as TIFF or EPS.  The file format\
  205. for the data is simple.  The first number is the number of ordered\
  206. pairs (%d), and the remaining numbers are the pairs (%f %f).  The error\
  207. checking for I/O is pathetic, so please feed 
  208. \b 2DLab
  209. \b0  well-behaved data files.\
  210. The Copy item of the Edit menu may be selected.  It sticks the contents of\
  211. the Geometry window in the pasteboard.\
  212. \b Algorithms
  213. \b0 \
  214. In the following brief descriptions, N is the number of 2D points,\
  215. and the O-notation refers to time complexity rather than space\
  216. complexity.  When the algorithms are invoked, those with quick eyes\
  217. will notice some graphical razzle-dazzle as the data structure is\
  218. constructed.  After the algorithm has completed, the `resulting'\
  219. data structure will remain in the window.\
  220. - Prim's O(N^2) Minimal Spanning Tree (MST) algorithm.\
  221. - Kruskal's O(E log E) MST algorithm. WARNING: the implementation\
  222. in this program is NOT optimal (it's actually O(N^2)).  Anybody\
  223. who wants to hack together the priority queue stuff to implement\
  224. the optimal algorithm is free to do so (lazy, that's me).\
  225. - Jarvis' O(N log N) convex hull construction algorithm.\
  226. - Graham's O(N log N) convex hull construction algorithm.\
  227. - Somebody's O(N log N) Voronoi diagram algorithm.\
  228. - Somebody's O(N log N) Delaunay triangulation algorithm.  (code\
  229. for these last two algorithms was written by Seth Teller, who\
  230. apparently used Fortune's netlib code as a basis).\
  231. - my own Gabriel Graph construction algorithm (it uses the\
  232. Delaunay triangulation as a starting point).\
  233. - my own Relative Neighborhood Graph construction algorithm (again,\
  234. using the Delaunay triangulation as a starting point).\
  235. Those interested in the details of the algorithms should refer to\
  236. Preparata and Shamos' book on computational geometry.  Sedgewick's\
  237. book also has covers geometric algorithms.  The GG and RNG haven't\
  238. been used much, and are a little harder to find in the literature.\
  239. Consult Toussaint, `The relative neighborhood graph of a finite\
  240. point set', Pattern Recognition 12, 261-268 for info about the RNG.\
  241. The Gabriel graph was used in Matula and Sokal, `Properties of\
  242. Gabriel Graphs Relevant to Geographic Variation Research and the\
  243. Clustering of Points in the Plane', Geographical Analysis 12,\
  244. 205-222.   However, I don't have either of those papers in my\
  245. posession.  This software was based on the discussion in Tuceryan\
  246. and Chorzempa, `Relative Sensitivity of a family of closest-point\
  247. graphs in computer vision applications', Pattern Recognition 24,\
  248. 361-374.\
  249. About the author; feedback\
  250. This program was written by:\
  251. Patrick Flynn\
  252. Assistant Professor\
  253. School of Electrical Engineering and Computer Science\
  254. Washingon State University\
  255. Pullman, WA 99164-2752\
  256. (flynn@eecs.wsu.edu)\
  257. If you find bugs, let me know.\
  258. If you add functionality, let me know.\
  259. If you like/hate it and just want to tell me, let me know.\
  260. Date: 9/91\
  261. NXCursor
  262. NXImage
  263. NXibeam
  264. Scroller
  265. _doScroller:
  266. @@@ffsX
  267. About 2DLab
  268. ScrollingTextKE
  269. 2DLab Control
  270. [20@]
  271. Status
  272. Animation & Display
  273. Colors
  274. Algorithm to Animate
  275. Prim's MST
  276. radio
  277. radioH
  278. Kruskal's MST
  279. Jarvis' Convex Hull
  280. Graham's Convex Hull
  281. Voronoi Diagram
  282. Delaunay Triangulation
  283. Gabriel Graph
  284. Relative Neighborhood Graph
  285. Radio
  286. Button
  287.     Anim/Disp
  288. Helvetica-Bold
  289. FormCell
  290.     # Points:
  291. Field:
  292. Auto-Go
  293. switch
  294. switchH
  295. Generate
  296. Slider
  297. SliderCell
  298. NXColorWell
  299. Background
  300. Foreground
  301. Line width: 4.0
  302.     Highlight
  303. # Points
  304. Slider2
  305.     ColorWell
  306. Field
  307. NXColorWell1
  308. {i*@@@}
  309. [32{i*@@@}]
  310. hide:
  311. terminate:
  312. paste:
  313. selectAll:
  314. makeKeyAndOrderFront:
  315. printPSCode:
  316.     openData:
  317.     saveData:
  318. close:
  319. copy:
  320. lineWidthText@
  321. lineWidthSlider@
  322. bgColorWell@
  323. fgColorWell@
  324. highColorWell@
  325. numPointsForm@
  326. setOperation:~@
  327. lineWidthChanged:
  328. random:
  329. setAutoUpdate:
  330. performMiniaturize:
  331. performClose:
  332. arrangeInFront:
  333. orderFrontColorPanel:
  334.     saveTIFF:
  335. saveEPS:
  336. animThenDisp:
  337. disp:
  338. statusText@
  339.